package com.csmht.tododemo.mapper;

import com.csmht.tododemo.pojo.entity.Todo;
import com.csmht.tododemo.pojo.entity.TodoClass;
import com.csmht.tododemo.pojo.entity.TodoWhitClass;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TodoClassMapper {
    void insert(Long todoId, List<Long> classes);

    @Delete("delete from todo_class where todo_id = #{todoId}")
    void del(Long todoId);

    @Select("select class_id from todo_class where todo_id = #{id}")
    List<Long> selectByTodoId(Long id);

    void insertByNames(Todo todo, List<String> names);
}
